<header class="header header-fixed navbar">
   <div class="brand">
       <a href="javascript:" class="ti-menu off-left visible-xs" data-toggle="offscreen" data-move="ltr"></a>
       <!-- Logo -->
       <a href="$!basePath/index" data-tabs-link class="navbar-brand">
           <img src="$!basePath/framework/img/logo.png" alt="">
           <span class="heading-font">
               	${system_admin_title}
           </span>
       </a>
   </div>
   #if($!layout == "layout-v")
	#if($!_sidebar.size() > 0)
	#set($parentName = $_sidebar.get(0))
	#end
   <ul class="nav navbar-nav vertical">
      <li></li>
      	#foreach($!first in $!_firstRes)
      		#if($!first.hasChildren == false)
           <li #if($parentName=="$!first.name")class="selected"#end data-first-res>
               <a href="$!{basePath}$!{first.url}" title="$!first.name" data-tabs-link icon="$!first.icon" #if($!{first.newWindow})target="_blank"#end>
                   <span>$!first.name #if($!first.hasChildren == true)&nbsp;&nbsp;&nbsp;<i class="fa fa-caret-down"></i>#end</span>
               </a>
           </li>
           #else
           <li #if($parentName=="$!first.name")class="selected"#end  data-first-res>
           	   <a href="javascript:;" data-toggle="dropdown" aria-expanded="true">$!first.name #if($!first.hasChildren == true)&nbsp;&nbsp;&nbsp;<i class="fa fa-caret-down"></i>#end</a>
               <ul class="dropdown-menu animated fadeIn">
               #foreach($!second in $!_secondRes.get($!first.id))
               	#if($!second.hasChildren == false)
		       	<li><a href="$!{basePath}$!{second.url}" title="$!second.name" data-tabs-link icon="$!second.icon" #if($!{second.newWindow})target="_blank"#end><i class="$!second.icon"></i> $!second.name</a></li>
		       	#else
		       <li>
					<a href="javascript:;" data-toggle="dropdown" aria-expanded="true">
						<span><i class="$!second.icon"></i> $!second.name</span>
						<i class="ti-angle-right pull-right"></i>
					</a>
					<ul class="dropdown-menu animated fadeIn">
						#foreach($!third in $!_thirdRes.get($!second.id))
						<li>
	                        <a href="$!{basePath}$!third.url" title="$!third.name" data-tabs-link icon="$!third.icon" #if($!{third.newWindow})target="_blank"#end #if($thirdName=="$!third.name")class="active"#end>
	                            <span><i class="$!third.icon"></i> $!third.name</span>
	                        </a>
	                    </li>
						#end
					</ul>
				</li>
		       	#end
               #end
               </ul>
            </li>
        	#end
      	#end
   </ul>
   #elseif($!layout == "layout-v2")
   #if($!_sidebar.size() > 0)
	#set($parentName = $_sidebar.get(0))
	#end
   <ul class="nav navbar-nav">
      <li></li>
      	#foreach($!first in $!_firstRes)
      		#if($!first.hasChildren == false)
           <li #if($parentName=="$!first.name")class="selected"#end data-first-res>
               <a href="$!{basePath}$!{first.url}" title="$!first.name" data-tabs-link icon="$!first.icon" #if($!{first.newWindow})target="_blank"#end>
                   <span>$!first.name</span>
               </a>
           </li>
           #else
           <li #if($parentName=="$!first.name")class="selected"#end  data-first-res>
           		#set($_second = $!_secondRes.get($!first.id).get(0))
           		#if($!_second.hasChildren == false)
           			#set($_url = $!_second.url)
           		#else
           			#set($_url = $!_thirdRes.get($!_second.id).get(0).url)
           		#end
               <a href="$!{basePath}$!{_url}" title="$!first.name" data-tabs-link icon="$!first.icon" #if($!{first.newWindow})target="_blank"#end>
                   <span>$!first.name</span>
               </a>
           </li>
        	#end
      	#end
   </ul>
   #else
   <ul class="nav navbar-nav horizontal">
       <li class="hidden-xs" data-toggle="tooltip" data-placement="bottom" title="展开/收缩菜单">
            <!-- 展开、缩小菜单 -->
           <a href="javascript:;" class="toggle-sidebar">
               <i class="ti-menu"></i>
           </a>
       </li>
       <li class="header-search" data-toggle="tooltip" data-placement="bottom" title="系统全局搜索">
           <!-- 搜索框 -->
           <a href="javascript:;" class="toggle-search">
               <i class="ti-search"></i>
           </a>
           <div class="search-container">
               <form role="search">
                   <input type="text" class="form-control search" placeholder="输入搜索内容后按回车键搜索">
               </form>
           </div>
       </li>
       <li data-toggle="tooltip" data-placement="bottom" title="显示/隐藏选项卡">
           <a href="javascript:;" onclick="Tabs.toggle()">
               <i class="fa fa-th"></i>
           </a>
       </li>
   </ul>
   #end
   <ul class="nav navbar-nav navbar-right">
       <li class="dropdown hidden-xs" data-toggle="tooltip" data-placement="bottom" title="系统快捷菜单">
           <a href="javascript:;" data-toggle="dropdown">
               <i class="ti-more-alt"></i>
           </a>
           <ul class="dropdown-menu animated">
               <li class="dropdown-header text-muted">快捷导航</li>
               <li class="divider"></li>
               #if($_quickMenus.size() > 0)
                   #foreach($menu in $_quickMenus)
                       <li>
                           <a href="$!menu.url" data-tabs-link >$!menu.name</a>
                       </li>
                   #end
               #else
                   <li class="dropdown-header text-muted">未添加快捷菜单</li>
               #end
               <li class="divider"></li>
               <li>
                   <a href="http://www.nethsoft.com" target="_blank">帮助</a>
               </li>
               <li>
                   <a href="javascript:;" onclick="ns.view.showModal('$!basePath/index/version')">关于</a>
               </li>
           </ul>
       </li>
       <li class="notifications dropdown" data-toggle="tooltip" data-placement="bottom" title="查看系统通知信息">
           <a href="javascript:;" onclick="ns.__notify();" data-toggle="dropdown" >
               <i class="ti-bell"></i>
               <script type="text/javascript" src="$!basePath/system/notify/count"></script>
           </a>
           <div class="dropdown-menu animated">
               <div class="panel no-m">
                   <div class="panel-heading text-muted"><b>通知中心</b>
                   </div>
                   <div class="panel content no-m" style="max-height:350px">
                   	 <ul class="list-group">
                       <li class="list-group-item">
                           <center><img src="$!basePath/framework/img/loading.gif"/></center>
                       </li>
                 	</ul>
                   </div>
                   <div class="panel-footer">
                      <a href="$!basePath/system/notify">查看全部通知</a>
                   </div>
                </div>
            </div>
            </li>
			<li class="dropdown hidden-xs" data-toggle="tooltip" data-placement="bottom" title="切换皮肤/布局">
                <a href="javascript:;" class="pg-toggle">
                    <i class="ti-palette"></i>
                </a>
            </li>
            <li class="off-right">
                <a href="javascript:;" data-toggle="dropdown">
                    #if($!headimg)
                    <img src="$!{basePath}$!headimg" class="header-avatar img-circle" alt="$!RealName" title="$!RealName">
                    #else
                    <img src="$!basePath/framework/img/avatar.jpg" class="header-avatar img-circle" alt="$!RealName" title="$!RealName">
                    #end
                    <span class="hidden-xs ml10">$!RealName</span>
                    <i class="ti-angle-down ti-caret hidden-xs"></i>
                </a>
                <ul class="dropdown-menu animated">
                    <li>
                        <a href="javascript:;" onclick="ns.userCenter()"><i class="fa fa-user"></i><span class="ml10">个人中心</span></a>
                    </li>
                    <li>
                        <a href="$!basePath/index/lock/on"><i class="fa fa-lock"></i><span class="ml10"> 锁定系统</span></a>
                    </li>
                    <li class="divider"></li>
                    <li class="hide">
                        <a href="javascript:;" onclick="ns.setting()"><i class="fa fa-cog"></i><span class="ml10">设置</span></a>
                    </li>
                    <li>
                        <a href="$!basePath/open/doc" target="_blank"><i class="fa fa-question-circle"></i><span class="ml10">帮助中心</span></a>
                    </li>
                    <li>
                        <a href="javascript:;" onclick="ns.checkUpdate()"><i class="fa fa-refresh"></i><span class="ml10">系统更新</span></a>
                    </li>
                    <li>
                        <a href="$!basePath/sign-again?username=$!username&password=$!password"><i class="fa fa-rotate-left"></i><span class="ml10">重新登陆</span></a>
                    </li>
                    <li>
                        <a href="javascript:;" onclick="ns.exit()"><i class="fa fa-power-off"></i><span class="ml10">退出系统</span></a>
                    </li>
                </ul>
            </li>
        </ul>
    </header>